SSH package for U++
--------------------
SSH package is a libssh2 wrapper for Ultimate++.
Currently it is in alpha stage.


Features and Highlights:
--------------------

- Tight integration with U++.
- Support for both synchronous and asynchronous operations  with both high level and low level methods.
- Allows using U++ style memory [de/re]allocators with libssh2.
- Ssh subsystems support RTTI, and share a common interface for polymorphism. 
- Supports password, public key, and keyboard interaction methods for client authorizaion.

Todo:
--------------------
- Add SshShell class for shell support.
- Add Tcp-IP and port forwarding support.
- Add more high level methods.
- Improve documentation.

History:
--------------------
2017-11-12:  Basic multithreading support added for SFtp, Scp, and Exec classes.

2017-11-10:  GetWaitEvents() and AddTo() methods addet to Ssh class.
             Scp, SshChannel, SshExec, SshHosts classes are added to the package.
             Documentation added for Ssh, SshSession, SFtp, Scp, SshExec, and SshHosts classes.

2017-10-21:  Ssh agents support added. A ToXml() method added to SFtp::DirEntry class.
             Timeouts error code is from now on -1000. This is to prevent unnecessary cleanup 
             rounds when the server is not responding.

2017-10-20:  Known hosts support is re-added via SshHosts class. Docs are updated accordingly.

2017-10-17:  Class names finalized:
             Core class       -> Ssh
             Session class    -> SshSession
             SFtp class       -> SFtp
             Channel class    -> SshChannel
             Scp class        -> Scp
             Exec class       -> SshExec
             Knownhosts class -> SshHosts
             SshAgents        -> (will be added as such)

             CreateSFtp(), CreateExec(), CreateScp(), CreateChannel() methods added to SshSession
             class. 
             Logging further refined.
             Error management further refined.
  
2017-10-15:  Second iteration of SSH package.

             1) This version brings a major redesign of overall components. SSH package's classes
                are redesigned around a core class named Ssh. Ssh allows a uniform 
                interface for both blocking and non-blocking modes of operation. Visible result
                of this new design is a single set of methods for both modes of operation for 
                each class. Methods starting with "Start" prefix are removed in favor of a 
                simple "NonBlocking()" switch.

             2) In accordance with this behaviour, a sort of "feature parity" is successfully 
                kept, thanks to the new design. Namely, in non-blocking mode, any result can be
                gathered using the new GetResult() method, which returns Value.

             3) All SSH package classes now has pick semantics.
            
             4) New design allows creation of higher-level ("complex") SFTP methods where needed.
                Unlike the simple SFTP methods, which work on file handles, Complex methods take 
                care of (allocate/free) file handles internally.
            
             5) Experimental multithreading support is added (using AsyncWork). This is still
                at a primitive stage. 
    
             6) Network proxy support is added. This new feature uses NetProxy (Http/Socks4/4a/5)
                package It works through a plugin, provided via SshSession::WhenProxy callback.
                And it is completely optional. 

             7) Cancellation mechanism is added. Any operation can be cancelled at any time using
                the Cancel() method.

             8) SFtp::DirEntry class now has a ToString() method. (It will also gain an ToXml()
                method.) This method will give an output similar to Unix ls command.

             9) LibSsh2 configured to use OpenSSL by default (WinCNG will be made a compile-time
                option in the next release).
            
2017-08-11:  Initial api reference docs for Ssh, Ssh::SubSystem, SFtp, Scp, Exec, Knownhosts, are added.
2017-07-31:  It is now possible to query, get, and set the possible transportation methods and exchange 
             algorithms. Added Ssh::Method(), Ssh::Methods(), Ssh::GetMethod(), Ssh::GetMethods() methods. 
             Ssh::Host class is from now on KnownHosts class.

2017-07-21:  Authentication methods (password, public key, keyboard interaction) are properly implemented.
             From now on it is possible to choose between authentication methods both on initialization,
             and on-the-fly (i.e. while logging in, using WhenAuth callback). 
             Ssh::Host class is added to the package. This class provides basic known hosts support.
             It is now possible to verify and trust servers.
             SshAlloc named as SshMalloc, and made into a general-purpose memory allocator (needed for keyboard callback).
             SshSubsystem class is now Ssh::Subsystem.

2017-07-04:  Credits should go to Koldo and Tom (Tom1). I am grateful for their feedback. Thanks!
             Include paths fixes. 

2017-07-03:  libssh2 config: Newer diffie-hellman-group-exchange-sha1 syntax enabled.
2017-07-02:  Initial MSC support added.
             Due to a name clash on MSC environment, addrinfo changed to ip_addrinfo.

2017-06-30:  The source code of libssh2 is added to the SSH package. 
             Exec::operator()() made inline.          

2017-06-29:  SshSubsystem::To(): reinterpret_csst() replaced with dynamic_cast().

2017-06-28:  EAGAIN is now properly handled across the subsystems.
             WhenWrite and WhenRead callbacks are removed in favour of parametrized gates.

2017-06-27:  SFtp::StartStop: fixed.

2017-06-27:  CleanUp() methods are added to the classes Ssh, SFtp, and Channel.
             This method utilizes JobQueue's WhenCleanup event.

2017-06-26:  U++ memory [de/re]allocators added and made default.
             initial support for ssh shell, and terminal added.
             Subsystems now perform a clean up on failure to prevent possible heap leaks.   
       
2017-06-22:  Initial release.
